How to set up Magento homepage as the default page and customize

您所在的位置:网站首页 how to set up a beautiful custom home page in How to set up Magento homepage as the default page and customize

How to set up Magento homepage as the default page and customize

2023-04-10 07:46| 来源: 网络整理| 查看: 265

Magento homepage is the most important page which visitors land on. A customized homepage, therefore, is essential in achieving the sales and conversion goals of the online store. It needs to be attractive and informative to helps visitors go further with the path to purchase. In this article, we are going to show you how to set up the Magento homepage as the default page and customize it in Magento 2 store.

Magento homepage overview

As you know, it takes less than a second for visitors to get the first impression of a website usually 50 ms is enough. In most cases, a homepage is the most important page which visitors land on. Magento homepage comes with plenty of goodies targeted at moving your potential customers along toward the buying process. It needs to be designed with regard to the latest tendencies and customer claims, so it is a great starting point for designing your customer experiences on your website

How to set up Magento home page as the default page?

When the Pearl Theme is installed, you can change between the sample Magento homepage as needed by following the Manual or Demo Settings Import setup instructions:

Change Homepage with Manual Setup

1. Set up the desired Magento homepage as the default store homepage

In order to change the Magento homepage, move to Magento Admin > Store > Configuration > Web > Default Pages and select the desired homepage. (Ex: Homepage V15)

2. Configure the width of the CMS Pages of your store (optional)

As each Magento homepage offers a specific page width, you need to set the CMS page width, from the section below, in order to match the width of our demo store:

Move to  Frontend options -> Section Width and set different widths for the store pages:

Cms Page: 100% / 1400px / 1200px / 80% etc..Row: 1200px / 100% etc..

Login to the Pearl Theme demo to test the exact page width for the store section, for each store view, Storeview 1 uses Homepage V1, Storeview 2 uses Homepage V2, etc.

3. Recreate the theme LESS/CSS and clear Magento cache from the Cache Management section.

Go to System > Cache Management

The new configured Magento homepage should show up on your Magento store

Set homepage from programmatically

You just need to inject the class \Magento\Config\Model\ResourceModel\Config $_resourceConfig and set up value for web/default/cms_home_page to desired page ‘youridentifier’.

public function __construct(\Magento\Config\Model\ResourceModel\Config $_resourceConfig) { $this->_resourceConfig = $_resourceConfig; } $this->_resourceConfig->saveConfig('web/default/cms_home_page', 'youridentifier', 'default', 0); How to customize Magento home page in Magento 2 store

The process of developing a customized Magento homepage for a Magento store comes with three steps:

Creation of Block.Creation of Categories and Products.Integration of the recent products into the homepage. 1. Creation of Block

The first step is the creation of Block. When finished, this allows the admin to place a banner on the homepage by including the relevant shortcode for the Block.

Log in to the Admin Panel of the Magento Store and move to the Content tab from the left corner of the page. Next step, click the Blocks option.

On the following screen, you need to click Add New Block.

At this step, you need to add the details of the Block. Enter the Block Title (Title of the Block) and Block Identifier (Id of the Block)

After providing details, upload the image in the Block.

Looking for the image file by clicking on the Browse option. Keep in mind that the following fields are not empty:

Image URL: Path/URL of image.Image Description: Description of image.Title: Title of the Image.

If you want to adjust the design parameters (dimensions, alignment) of the image, move to the Appearance tab.

When finished, click on Insert file.

To finish the process, click Save Block.

2. Creation of Categories and Products

In this tutorial,  we will use the example of a Magento store that provides a selection of mobile phones.

Creating CategoriesMove to the Products tab from the left corner of the page and then click on the Categories option.

The first category that needs to be generated is SAMSUNG. Offer the details of the category and click Save as shown in the image below:

Generate three more categories: NOKIA, IPHONE, and LENOVO .

Creating ProducMove to the Products tab from the left corner of the page and click on the Catalog option.

Click on Add Product.

Provide the details of the product, choose the category for the product, and then click Save.

Generate more products by following the steps mentioned above.

3. Integration of Block and Products into the Homepage

Log in to the Admin Panel of the Magento store, move to the Content tab from the left corner of the page, and then click on the Page option.

Click the Edit on the Magento homepage

Move to the content section:

Integration of the Block

You could add the Block in the content section by using this shortcode:

{{block class=”Magento\Cms\Block\Block” block_id=”Banner_View”}}

In this shortcode, Block_id is the same ID that was used in the creation of the blog.

Integration of the Products

Click on Insert Widget option:

Choose Catalog New Products List from the list, and set all its attributes according to your requirements.The following screen will display.  Click on Save Page.At the last step,  you can access the store and see the custom homepage in action!

The Magento homepage is the face of your online business, and every day you have to show it to hundreds of potential customers with different tastes. So, a little ‘makeup’ will never hurt to present the best version of your  Magento website to the world.

Magento platform comes with a lot of useful features for creating a fully functional homepage.  Magento 2 CMS Page Builder is a powerful extension allowing you to build any page fast and easily. It allows you to edit CMS pages, product descriptions,s and category descriptions effortlessly and visually at the front-end. As a result, you can see what you’ve performed instantly whether it is a minimal adjustment right on the user interface. No coding knowledge requires

Besides, if you are looking out for a cost effective Magento package for your eCommerce store, then look nowhere other than Magesolution. We not only offer an affordable Magento Development Package for all size and budget but also ensure that it helps your online business grow and sustain. Contact us for a free consultation!



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3